export function firstUpperCase(str: String) {
    return str.replace(/^\S/, function (s) {
        return s.toUpperCase();
    });
}

export function getCookie(name: String) {
    if (typeof document === 'undefined' || !document.cookie) {
        return '';
    }
    return document.cookie.match(new RegExp('(^| )' + name + '=([^;]*)(;|$)')) ? decodeURIComponent(RegExp.$2) : '';
}